// import React from 'react';
// import ReactDOM from 'react-dom';

import React from './lib/react';
import ReactDOM from './lib/react-dom';

function FunctionComponent2(props) {
  return <div className="demo" style={{color: 'blue'}}>Hello2 {props.name}</div>
}

function FunctionComponent(props) {
  // return React.createElement('h1', {className: 'title', style:{color: 'blue'}}, 'hello')
  // return <div className="demo" style={{color: 'blue'}}>Hello {props.name}</div>
  return <FunctionComponent2 name={props.name} />
}
const App = <FunctionComponent name="timly" />

ReactDOM.render(
  App,
  document.getElementById('root')
);

// 注意如果要使用老的把 jsx 编译成 React.createElement(), 必须在启动项中设置 cross-env DISABLE_NEW_JSX_TRANSFORM=true
// 如： "start": "cross-env DISABLE_NEW_JSX_TRANSFORM=true react-scripts start",